package com.kang.bean.bot;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

/**
 * @program: service
 * @description: 城池
 * @author: K.faWu
 * @create: 2022-06-09 09:48
 **/
@Data
public class City {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    private String accountCode; //账号
    private String groupCode; //群聊，即一个群中一个账号
    @JsonSerialize(using = ToStringSerializer.class)
    private Long warId; //主城坐标
    private Long num; //城池数量
    private Long populationNum; //人口
    private Long foodNum; //粮食
    private Long woodNum; //木材
    private Long mineNum; //矿石

    /**
     * 初始化城池对象
     * @param accountCode
     */
    public City(String accountCode, String groupCode){
        this.accountCode = accountCode;
        this.groupCode = groupCode;
        this.num = 1L;
        this.populationNum = 100L;
        this.foodNum = 500L;
        this.woodNum = 500L;
        this.mineNum = 500L;
    }
    public City(){}
}
